package com.zzxy.spring34.controller;

import com.zzxy.spring34.service.IStudentService;
import com.zzxy.spring34.service.impl.StudentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class StudentController {
    @Autowired
    private IStudentService studentService;
    // public IStudentService getStudentService(){
//return studentService;
//}
//public void setStudentService(IStudentService studentService){
// this.studentService = studentService;
//}
    public void regieter(){
//service
        studentService.registerStudent();
    }
    public void addStudent(String username,String password) {

    }

    public void setStudentService(StudentServiceImpl studentService) {
        this.studentService = studentService;
    }

    public StudentServiceImpl getStudentService() {
        return (StudentServiceImpl) studentService;
    }
}